import logging

import yagmail


def sever_log():
    logging.basicConfig(filename='HBHZ.txt',filemode='w+',level=logging.DEBUG,format='%(funcName)s->%(levelname)s->%(asctime)s->%(message)s')
def send_mail(file):
    ya=yagmail.SMTP(user='3974562803@qq.com',password='xxqhmxvushrqcbfh',host='smtp.qq.com')
    ya.send(to='maqiyun1234@qq.com',subject='综合服务平台新增代理商接口测试报告',contents='今日测试报告与附件,请注意查收',attachments=file)